package c.e.b.m;

/* compiled from: FirebaseInstallations */
public final /* synthetic */ class c implements Runnable {
    public final d a;
    public final boolean b;

    public c(d dVar, boolean z) {
        this.a = dVar;
        this.b = z;
    }

    /* JADX WARNING: Removed duplicated region for block: B:77:? A:{SYNTHETIC, RETURN} */
    /* JADX WARNING: Removed duplicated region for block: B:31:0x0070 A:{SYNTHETIC} */
    /* JADX WARNING: Removed duplicated region for block: B:41:0x0091  */
    /* JADX WARNING: Removed duplicated region for block: B:43:0x0094  */
    /* JADX WARNING: Removed duplicated region for block: B:54:0x00b2  */
    /* JADX WARNING: Removed duplicated region for block: B:53:0x00a7  */
    public void run() {
        /*
        r13 = this;
        r0 = r13.a;
        r1 = r13.b;
        r2 = c.e.b.m.d.l;
        java.util.Objects.requireNonNull(r0);
        r2 = c.e.b.m.d.l;
        monitor-enter(r2);
        r3 = r0.a;	 Catch:{ all -> 0x00dd }
        r3.a();	 Catch:{ all -> 0x00dd }
        r3 = r3.a;	 Catch:{ all -> 0x00dd }
        r4 = "generatefid.lock";
        r3 = c.e.b.m.a.a(r3, r4);	 Catch:{ all -> 0x00dd }
        r4 = r0.c;	 Catch:{ all -> 0x00d6 }
        r4 = r4.b();	 Catch:{ all -> 0x00d6 }
        if (r3 == 0) goto L_0x0024;
    L_0x0021:
        r3.b();	 Catch:{ all -> 0x00dd }
    L_0x0024:
        monitor-exit(r2);	 Catch:{ all -> 0x00dd }
        r3 = r4.h();	 Catch:{ f -> 0x00d1 }
        r5 = 1;
        r6 = 0;
        if (r3 != 0) goto L_0x006b;
    L_0x002d:
        r3 = r4.f();	 Catch:{ f -> 0x00d1 }
        r7 = c.e.b.m.l.c.a.UNREGISTERED;	 Catch:{ f -> 0x00d1 }
        if (r3 != r7) goto L_0x0037;
    L_0x0035:
        r3 = 1;
        goto L_0x0038;
    L_0x0037:
        r3 = 0;
    L_0x0038:
        if (r3 == 0) goto L_0x003b;
    L_0x003a:
        goto L_0x006b;
    L_0x003b:
        if (r1 != 0) goto L_0x0066;
    L_0x003d:
        r1 = r0.d;	 Catch:{ f -> 0x00d1 }
        java.util.Objects.requireNonNull(r1);	 Catch:{ f -> 0x00d1 }
        r3 = r4.a();	 Catch:{ f -> 0x00d1 }
        r3 = android.text.TextUtils.isEmpty(r3);	 Catch:{ f -> 0x00d1 }
        if (r3 == 0) goto L_0x004d;
    L_0x004c:
        goto L_0x0061;
    L_0x004d:
        r7 = r4.g();	 Catch:{ f -> 0x00d1 }
        r9 = r4.b();	 Catch:{ f -> 0x00d1 }
        r9 = r9 + r7;
        r7 = r1.a();	 Catch:{ f -> 0x00d1 }
        r11 = c.e.b.m.k.a;	 Catch:{ f -> 0x00d1 }
        r7 = r7 + r11;
        r1 = (r9 > r7 ? 1 : (r9 == r7 ? 0 : -1));
        if (r1 >= 0) goto L_0x0063;
    L_0x0061:
        r1 = 1;
        goto L_0x0064;
    L_0x0063:
        r1 = 0;
    L_0x0064:
        if (r1 == 0) goto L_0x00d5;
    L_0x0066:
        r1 = r0.a(r4);	 Catch:{ f -> 0x00d1 }
        goto L_0x006f;
    L_0x006b:
        r1 = r0.g(r4);	 Catch:{ f -> 0x00d1 }
    L_0x006f:
        monitor-enter(r2);
        r3 = r0.a;	 Catch:{ all -> 0x00ce }
        r3.a();	 Catch:{ all -> 0x00ce }
        r3 = r3.a;	 Catch:{ all -> 0x00ce }
        r4 = "generatefid.lock";
        r3 = c.e.b.m.a.a(r3, r4);	 Catch:{ all -> 0x00ce }
        r4 = r0.c;	 Catch:{ all -> 0x00c7 }
        r4.a(r1);	 Catch:{ all -> 0x00c7 }
        if (r3 == 0) goto L_0x0087;
    L_0x0084:
        r3.b();	 Catch:{ all -> 0x00ce }
    L_0x0087:
        monitor-exit(r2);	 Catch:{ all -> 0x00ce }
        r2 = r1.f();
        r3 = c.e.b.m.l.c.a.REGISTERED;
        if (r2 != r3) goto L_0x0091;
    L_0x0090:
        goto L_0x0092;
    L_0x0091:
        r5 = 0;
    L_0x0092:
        if (r5 == 0) goto L_0x00a1;
    L_0x0094:
        r2 = r1;
        r2 = (c.e.b.m.l.a) r2;
        r2 = r2.b;
        monitor-enter(r0);
        r0.j = r2;	 Catch:{ all -> 0x009e }
        monitor-exit(r0);
        goto L_0x00a1;
    L_0x009e:
        r1 = move-exception;
        monitor-exit(r0);
        throw r1;
    L_0x00a1:
        r2 = r1.h();
        if (r2 == 0) goto L_0x00b2;
    L_0x00a7:
        r2 = new c.e.b.m.f;
        r3 = c.e.b.m.f.a.BAD_CONFIG;
        r2.m6176init(r3);
        r0.h(r1, r2);
        goto L_0x00d5;
    L_0x00b2:
        r2 = r1.i();
        if (r2 == 0) goto L_0x00c3;
    L_0x00b8:
        r2 = new java.io.IOException;
        r3 = "Installation ID could not be validated with the Firebase servers (maybe it was deleted). Firebase Installations will need to create a new Installation ID and auth token. Please retry your last request.";
        r2.<init>(r3);
        r0.h(r1, r2);
        goto L_0x00d5;
    L_0x00c3:
        r0.i(r1);
        goto L_0x00d5;
    L_0x00c7:
        r0 = move-exception;
        if (r3 == 0) goto L_0x00cd;
    L_0x00ca:
        r3.b();	 Catch:{ all -> 0x00ce }
    L_0x00cd:
        throw r0;	 Catch:{ all -> 0x00ce }
    L_0x00ce:
        r0 = move-exception;
        monitor-exit(r2);	 Catch:{ all -> 0x00ce }
        throw r0;
    L_0x00d1:
        r1 = move-exception;
        r0.h(r4, r1);
    L_0x00d5:
        return;
    L_0x00d6:
        r0 = move-exception;
        if (r3 == 0) goto L_0x00dc;
    L_0x00d9:
        r3.b();	 Catch:{ all -> 0x00dd }
    L_0x00dc:
        throw r0;	 Catch:{ all -> 0x00dd }
    L_0x00dd:
        r0 = move-exception;
        monitor-exit(r2);	 Catch:{ all -> 0x00dd }
        throw r0;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.e.b.m.c.run():void");
    }
}
